#ifndef LOGMANAGE_H
#define LOGMANAGE_H


#include <QWidget>
#include <QDateTimeEdit>
#include <QComboBox>
#include <QLineEdit>
#include <QPushButton>
#include <QTableView>
#include <QStandardItemModel>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QMessageBox>
#include <QFileDialog>
#include <QLabel>
#include <QHeaderView>
#include "logclass.h"
#include "sqlitemanage.h"

class LogManage : public QWidget
{
    Q_OBJECT
public:
    explicit LogManage(QWidget *parent = nullptr);
    ~LogManage();

private slots:
    void onQueryButtonClicked();
    void onExportButtonClicked();

private:
    void initUI();
    void initConnections();
    void updateLogTable(const QVector<QVector<QVariant>>& logs);

private:
    QDateTimeEdit* m_startTimeEdit;
    QDateTimeEdit* m_endTimeEdit;
    QComboBox* m_logTypeCombo;
    QLineEdit* m_keywordEdit;
    QPushButton* m_queryButton;
    QPushButton* m_exportButton;
    QTableView* m_logTableView;
    QStandardItemModel* m_logModel;
    SqliteManage *m_pSqliteManage;
};


#endif // LOGMANAGE_H
